package top.whysu.study.thinkinjava.chapter8.polymorphism.example2;

/**
 * @description
 * @date 2021-07-19 15:08
 */
public class Test {
    private static RandomShapeGenerator gen = new RandomShapeGenerator();

    public static void main(String[] args) {
        Shape[] s = new Shape[9];
        for (int i = 0; i < s.length; i++) {
            s[i] = gen.next();
        }
        for (Shape shape : s) {
            shape.draw();
            shape.color();
        }
    }
}